package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the IN_DOCTOR_ADVICE database table.
 * 
 */
@Entity
@Table(name="IN_DOCTOR_ADVICE")
@NamedQuery(name="InDoctorAdvice.findAll", query="SELECT i FROM InDoctorAdvice i")
public class InDoctorAdvice implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="IN_DOCTOR_ADV_ID")
	private long inDoctorAdvId;

	private String diagnosis;

	@Column(name="DOCTOR_ADVICE")
	private String doctorAdvice;

	@Column(name="DOCTOR_ADVICE_TYPE")
	private String doctorAdviceType;

	@Column(name="DOCTOR_STATUS")
	private String doctorStatus;

	//bi-directional many-to-one association to HospWorkInErx
	@OneToMany(mappedBy="inDoctorAdvice")
	private List<HospWorkInErx> hospWorkInErxs;

	public InDoctorAdvice() {
	}

	public long getInDoctorAdvId() {
		return this.inDoctorAdvId;
	}

	public void setInDoctorAdvId(long inDoctorAdvId) {
		this.inDoctorAdvId = inDoctorAdvId;
	}

	public String getDiagnosis() {
		return this.diagnosis;
	}

	public void setDiagnosis(String diagnosis) {
		this.diagnosis = diagnosis;
	}

	public String getDoctorAdvice() {
		return this.doctorAdvice;
	}

	public void setDoctorAdvice(String doctorAdvice) {
		this.doctorAdvice = doctorAdvice;
	}

	public String getDoctorAdviceType() {
		return this.doctorAdviceType;
	}

	public void setDoctorAdviceType(String doctorAdviceType) {
		this.doctorAdviceType = doctorAdviceType;
	}

	public String getDoctorStatus() {
		return this.doctorStatus;
	}

	public void setDoctorStatus(String doctorStatus) {
		this.doctorStatus = doctorStatus;
	}

	public List<HospWorkInErx> getHospWorkInErxs() {
		return this.hospWorkInErxs;
	}

	public void setHospWorkInErxs(List<HospWorkInErx> hospWorkInErxs) {
		this.hospWorkInErxs = hospWorkInErxs;
	}

	public HospWorkInErx addHospWorkInErx(HospWorkInErx hospWorkInErx) {
		getHospWorkInErxs().add(hospWorkInErx);
		hospWorkInErx.setInDoctorAdvice(this);

		return hospWorkInErx;
	}

	public HospWorkInErx removeHospWorkInErx(HospWorkInErx hospWorkInErx) {
		getHospWorkInErxs().remove(hospWorkInErx);
		hospWorkInErx.setInDoctorAdvice(null);

		return hospWorkInErx;
	}

}